extends NodeState

func get_player() -> Player:
	return Player.get_instance()

var direction: Vector2


func _on_process(_delta : float) -> void:
	var direction = get_player().direction
	var walk_dir = get_player().mul_direction
	# 播放动画
	get_player().player_4anim(direction, "walk")
	# 移动玩家
	get_player().velocity = walk_dir * get_player().speed
	get_player().move_and_slide()
	

func _on_physics_process(_delta : float) -> void:
	pass
	

func _on_next_transitions() -> void:
	if !GameInputEvents.is_movement_input():
		transition.emit("Idle")
	pass


func _on_enter() -> void:
	pass


func _on_exit() -> void:
	pass
